package day05;

import java.util.Scanner;

public class ArrayDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        double[] score = new double[10];

        for (int i = 0; i < score.length; i++) {
            System.out.println("请输入"+ (i + 1)+"个学生的成绩：");
            score[i] = scanner.nextDouble();
        }
        double total = 0;
        for (int i = 0; i < score.length; i++) {
            total += score[i];
        }
        double evg = total / score.length;
        System.out.println("总成绩：" + total + "平均分：" + evg);

    }
}

